<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<base href="http://127.0.0.1:9421/rsui/0/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Player</title>
<script language="JavaScript">
<!--
function detectPlugin() {
    // allow for multiple checks in a single pass
    var daPlugins = detectPlugin.arguments;
    // consider pluginFound to be false until proven true
    var pluginFound = false;
    // if plugins array is there and not fake
    if (navigator.plugins && navigator.plugins.length > 0) {
	var pluginsArrayLength = navigator.plugins.length;
	// for each plugin...
	for (pluginsArrayCounter=0; pluginsArrayCounter < pluginsArrayLength; pluginsArrayCounter++ ) {
	    // loop through all desired names and check each against the current plugin name
	    var numFound = 0;
	    for(namesCounter=0; namesCounter < daPlugins.length; namesCounter++) {
    		// if desired plugin name is found in either plugin name or description
    		if( (navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCounter]) >= 0) || 
    		    (navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[namesCounter]) >= 0) ) {
    		    // this name was found
    		    numFound++;
    		}   
	    }
	    // now that we have checked all the required names against this one plugin,
	    // if the number we found matches the total number provided then we were successful
	    if(numFound == daPlugins.length) {
            pluginFound = true;
            // if we've found the plugin, we can stop looking through at the rest of the plugins
            break;
	    }
	}
    }
    return pluginFound;
} // detectPlugin

function detect( )
{
    if( detectPlugin('QuickTime') && !detectPlugin('DivX') )
    {
        var pageHTML;
        pageHTML = "<center><br><br><b>It seems you have quicktime installed.<br></b>";
        pageHTML += "<br>Quicktime trys to play AVI files, but fails and will often freeze your browser.";
        pageHTML += "<br>To play AVI files, we recommend <a href=http://www.divx.com/divx/webplayer/>the DivX Web Player plugin.</a>";
        pageHTML += "<br><br>After installing, <a href='javascript:loadPlayer( );'>click here to play the file.</a>";
        pageHTML += "<br><br><br><br><br><br><table width=490><tr><td><b>Tip:</b>To disable Quicktime for AVI, open Quicktime Preferences / Plugin Settings and uncheck Video->AVI in both the \"MIME Settings\" and \"File Types\" sections, and then restart Firefox.</td></tr></table>";
        var target = document.getElementById( "RS_WEBSITE_CONTENT" );
        if (target) target.innerHTML = pageHTML;
    }
    else loadPlayer( );
}

function loadPlayer( )
{
    // Load player code
    var url = "" + window.location;
    var url = url.substr( url.indexOf( "url=" ) + 4 );
    var pageHTML;
    pageHTML = "<center><object classid=\"clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616\" width=\"666\" height=\"500\" codebase=\"http://go.divx.com/plugin/DivXBrowserPlugin.cab\">";
    pageHTML += "<param name=\"src\" value=\"" + url + "\" />";
    pageHTML += "<embed type=\"video/divx\" src=\"" + url + "\" width=\"666\" height=\"500\" pluginspage=\"http://go.divx.com/plugin/download/\"></embed></object>";
    var target = document.getElementById( "RS_WEBSITE_CONTENT" );
    if (target) target.innerHTML = pageHTML;
}
</script>
</head><br>
<body onload="javascript:detect( );" background="images/bg.jpg">
<div id="RS_WEBSITE_CONTENT"></div>
</body>
</html>
